/*****************************************************************************
*
* File: hw_init.h
*
* Description: Header file for hw_init.c
*
* Author: Kevin Casteel, Luis Castillo
*
* Revisions: v-1.0 (4/18/11)
*            v-1.1 (4/22/11)
*
******************************************************************************/

#ifndef _HW_INIT_H
#define _HW_INIT_H

#define FALSE    0
#define TRUE     1
#define PIN0     0
#define PIN2     2
#define PIN4     4
#define DELAY1 100
#define DELAY2  50

/* structure definition */
typedef struct parameters{
    uint8_t led;
	uint16_t millisec;
} parameters_t;


/* function prototypes */

/*---------------------------------------------------------
* Function: vTaskFunction_1
*
* Description: Function performs the task. Toggles LED
* 			   specified by the pvParameters structure at a
*			   rate also designated by the same structure.
*
* parameter: pvParameters structure that contains the led
*			 and rate for it to be toggled.
*---------------------------------------------------------*/
void vTaskFunction_1(void *pvParameters); 


/*---------------------------------------------------------
* Function: vTaskFunction_2
*
* Description: Function performs the task. Toggles LED
* 			   specified by the pvParameters structure at a
*			   rate also designated by the same structure.
*
* parameter: pvParameters structure that contains the led
*			 and rate for it to be toggled.
*---------------------------------------------------------*/
void vTaskFunction_2(void *pvParameters); 


/*---------------------------------------------------------
* Function: vHandlerTask
*
* Description: Task handles data after an interrupt is
* 			   received. It also works as a mechanism to
*			   debounce SW7.
*---------------------------------------------------------*/
void vHandlerTask(void);


/*---------------------------------------------------------
* Function: vIO_init
*
* Description: Function initializes port data direction
* 			   and clears it.
*---------------------------------------------------------*/
void vIO_init(void); 


/*---------------------------------------------------------
* Function: vINT0_init
*
* Description: Function initializes INT0
*---------------------------------------------------------*/
void vINT0_init(void);


/*---------------------------------------------------------
* Function: vSSEG_init
*
* Description: Function initializes sseg display
*---------------------------------------------------------*/
void vSSEG_init(void);


#endif
